<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlertShopAddAppletOpenColums extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('shops', function (Blueprint $table) {
            $table->unsignedTinyInteger('isBusiness')->default(1)->comment('是否营业 0 暂停营业 1 营业中')->after('status');
            $table->unsignedTinyInteger('appletStatus')->default(0)->comment('小程序营业状态 0 正常 1 暂停营业')
                  ->after('isBusiness');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('shops', function (Blueprint $table) {
            $table->dropColumn('isBusiness');
            $table->dropColumn('appletStatus');
        });
    }
}
